package structuralPattern.flyweight.example01;

public class Client {
    public static void main(String[] args) {
        FlyweightFactory factory = new FlyweightFactory();

        Flyweight a = factory.getFlyweight("E");
        a.operation("a======");


        Flyweight a1 = factory.getFlyweight("E");
        a1.operation("a1=====");

        System.out.println(a == a1);

        System.out.println("=========================================");
        UnsharedFlyweight b = new UnsharedFlyweight("B");
        b.operation("b=====");
        UnsharedFlyweight b1 = new UnsharedFlyweight("B");
        b1.operation("b1=====");

        System.out.println(b == b1);
    }
}
